package ${location}.utils;

import java.time.ZoneId;
import java.util.Date;

/**
 * @author ${author}
 */
public class DateUtils {

	public static Date plusYears(Date date, Long years) {
		return Date.from(date.toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime().plusYears(years)
				.atZone(ZoneId.systemDefault()).toInstant());
	}

	public static Date plusDays(Date date, Long days) {
		return Date.from(date.toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime().plusDays(days)
				.atZone(ZoneId.systemDefault()).toInstant());
	}

	public static Date plusHours(Date date, Long hours) {
		return Date.from(date.toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime().plusHours(hours)
				.atZone(ZoneId.systemDefault()).toInstant());
	}

	public static Date plusMinutes(Date date, Long minutes) {
		return Date.from(date.toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime().plusMinutes(minutes)
				.atZone(ZoneId.systemDefault()).toInstant());
	}

	public static Date plusMonths(Date date, Long months) {
		return Date.from(date.toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime().plusMonths(months)
				.atZone(ZoneId.systemDefault()).toInstant());
	}

	public static Date plusWeeks(Date date, Long weeks) {
		return Date.from(date.toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime().plusWeeks(weeks)
				.atZone(ZoneId.systemDefault()).toInstant());
	}

	public static Date plusSeconds(Date date, Long seconds) {
		return Date.from(date.toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime().plusSeconds(seconds)
				.atZone(ZoneId.systemDefault()).toInstant());
	}
}
